#include "../include/header.h"
int main(int argc, char* argv[]){
    int pipe_fd = open("1.pipe", O_WRONLY);

    int times = 0;

    fd_set set;
    FD_ZERO(&set);

    while(1){
        FD_SET(pipe_fd, &set);

        printf("select before \n");
        select(10, NULL, &set, NULL, NULL);
        printf("select after \n");


        char buf[4096] = {0};
        write(pipe_fd, buf, sizeof(buf));
        

        times++;
        printf("times: %d \n", times);
    }
    printf(">>>>>>\n");

    return 0;
}